<div class="container" ng-controller="UserController" style="margin-left: 0;padding-left: 0;">
	<div class="row" style="padding-left: 12px;">
		<div class="col-md-3" style="float: left;padding-top: 9px;padding-left: 0;">
			<div fc-org-tree-view="orgList" data-selected-org="selectedOrg" data-on-org-select="orgClick()" data-tree-param="treeParam"></div>
		</div>
		<div class="col-md-8" style="float: left;padding-left: 0;">
			<div class="navbar" style="margin-bottom: -2px;">
				<form class="navbar-form" style="padding-left: 0;">
						<a type="button" class="btn btn-primary" ng-click="editUser()">新增</a>
		                <a type="button" class="btn btn-primary" ng-click="resetUserState(2)">停用</a>
		                <a type="button" class="btn btn-primary" ng-click="resetUserState(1)">启用</a>
		                <a type="button" class="btn btn-primary" ng-click="resetUserPassword()">重置密码</a>
		                <div class="pull-right">
		                	<input class="form-control" data-ng-keydown="enterSearch($event)" data-ng-model="searchObj.searchKey" placeholder="输入关键词搜索用户">
		                	<button class="btn btn-default" data-ng-click="searchUser()">搜索</button>
		            	</div>
				</form>
			</div>
			<div class="col-md-12" style="padding-left: 0;">
				<table class="table table-bordered table-striped table-hover" style="text-align: center;">
					<thead>
						<tr>
							<th style="text-align: center;"><input type="checkbox"
								ng-click="toggleAll()" ng-checked="isSelectAll" style="cursor: pointer;">
							</th>
							<th style="text-align: center;">登录帐号</th>
							<th style="text-align: center;">姓名</th>
							<th style="text-align: center;">性别</th>
							<th style="text-align: center;">所属组织</th>
							<th style="text-align: center;">启用/停用</th>
						</tr>
					</thead>
					<tbody>
						<tr data-ng-repeat="user in users"
							ng-class="{disable: user.stop, active: selectedUserList[user.userId]}">
							<td><input type="checkbox" ng-checked="selectedUserList[user.userId]" style="cursor: pointer;" ng-click="toggleUser(user)">	</td>
							<td style="cursor: pointer;" ng-click="editUser(user)">{{user.loginName}}</td>
							<td style="cursor: pointer;" ng-click="editUser(user)">{{user.userName}}</td>
							<td style="cursor: pointer;" ng-if="user.sex == 0" ng-click="editUser(user)">男</td>
							<td style="cursor: pointer;" ng-if="user.sex == 1" ng-click="editUser(user)">女</td>
                            <td style="cursor: pointer;" ng-click="editUser(user)">
                                <span data-ng-repeat="org in user.orgList" data-tooltip="{{org.parentOrgs}}" class="hoverWord">
                                    {{org.orgName}};
                                </span>
                            </td>
							<td style="cursor: pointer;color: red;" ng-if="user.stop == true" ng-click="editUser(user)">停用</td>
							<td style="cursor: pointer;" ng-if="user.stop == false" ng-click="editUser(user)">启用</td>
						</tr>
					</tbody>
				</table>
	
			</div>

            <!--分页-->
            <div class="col-lg-12 pull-right" style="text-align: center;" ng-if="users && users.length > 0">
                <ul class="pagination" style="float: right;">
                    <li><a ng-hide="currentPage == 1" href ng-click="upPage();">&laquo;</a></li>
                    <li ng-repeat="page in pages" ng-class="{'active': page == currentPage}">
                        <a href ng-click="gotoPage(page);">{{page}}</a>
                    </li>
                    <li><a ng-hide="currentPage == totalPages || !totalPages" href ng-click="nextPage();">&raquo;</a></li>
                </ul>
            </div>

		</div>       
	</div>       
</div>
